package com.liuyh.demo.dao;

import com.liuyh.demo.domain.Customer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface CustomerRespository extends JpaRepository<Customer,Long> {

    Customer findCustomerByCustomerName(String customerName);

    @Query("from Customer u where u.customerName=:customerName")
    Customer findCustomerByNameInput(@Param("customerName") String customerName);
}
